<!--
 * @Author: “liuwen” “2499940082@qq.com”
 * @Date: 2023-07-06 14:25:45
 * @LastEditors: “liuwen” “2499940082@qq.com”
 * @LastEditTime: 2023-07-06 14:44:50
 * @FilePath: \00.jszt-ui\src\views\my-echart\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 组件说明 -->
<template>
  <div :id="id" :style="{ height: height, width: width }">echarts</div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  components: {},
  props: {
    id: {
      type: String,
      default: 'echarts-id',
    },
    options: {
      type: Object,
    },
    height: {
      type: String,
      default: '200px',
    },
    width: {
      type: String,
      default: '200px',
    },
  },
  data() {
    return {}
  },
  computed: {},
  methods: {},
  mounted() {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById(this.id))
    // 绘制图表
    myChart.setOption(this.options)
  },
}
</script>

<style lang="scss" src=""></style>
